home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / memory / emsaw41s.zip / TEST2P.PAS < prev    next >
Pascal/Delphi Source File  |  1994-06-26  |  2KB  |  90 lines

  1. {     TEST2P.PAS     }
  2. {$N+}
  3.  
  4. program main(output);
  5. {$I type400.pas}
  6. {$L emsw40sp.obj}
  7. {or emsw40p.obj}
  8.  
  9. var
  10. A, B, C, D, two, ten, sixfo, theto, ival2, four, fivei:integer;
  11. arin64: array [0..31] of word;  arout64: array [0..31] of word;
  12. maxdim, actelem: array[0..4] of longint;
  13. totsiz, avsiz, te, hun, fivto:longint;
  14. rval1, rval2:single;
  15. ththe, eval2:extended;
  16.  
  17.       begin
  18.       EMINIT;
  19.       two:=2;
  20.       SIZA (totsiz, avsiz, two);
  21.       writeln (totsiz:8,'      ',avsiz:8);
  22.       fivto:=50000;
  23.       NEWA (A, fivto, two);
  24.       theto:=30000;
  25.       SETEL (A, fivto, theto);
  26.       GETEL (A, fivto, ival2);
  27.       writeln (theto:8,'     ', ival2:8);
  28.       writeln('end 2 by int');
  29.       writeln;
  30.       readln;
  31.       FREEA(A);
  32.  
  33.       ten:=10;
  34.       SIZA (totsiz, avsiz, ten);
  35.       writeln (totsiz:8,'      ',avsiz:8);
  36.       hun:=100;
  37.       NEWA2  (B, hun, hun, ten);
  38.       ththe:=30000.0;
  39.       SETEL2 (B, hun, hun, ththe);
  40.       GETEL2 (B, hun, hun, eval2);
  41.       writeln (ththe:8,'      ',eval2:8);
  42.       writeln ('end 10 by real');
  43.       writeln ;
  44.       readln;
  45.       FREEA(B);
  46.  
  47.      {The rest of the program can be executed using the full version of the
  48.       package}
  49. {
  50.       sixfo:=64;
  51.       SIZA (totsiz, avsiz, sixfo);
  52.       writeln (totsiz:8,'      ',avsiz:8);
  53.       te:=10;
  54.       NEWA3 (C, te, te, te, sixfo);
  55.       arin64[1]:=30000;
  56.       SETEL3 (C, te, te, te, arin64[0]);
  57.       GETEL3 (C, te, te, te, arout64[0]);
  58.       writeln (arin64[1]:8,'      ',arout64[1]:8);
  59.       writeln('end 3-D 64 by int array');
  60.       writeln;
  61.       readln;
  62.       FREEA(C);
  63.  
  64.  
  65.       four:=4;
  66.       SIZA(totsiz,avsiz,four);
  67.       writeln (totsiz:8,'      ',avsiz:8);
  68.       maxdim[0]:=40;
  69.       maxdim[1]:=10;
  70.       maxdim[2]:=10;
  71.       maxdim[3]:=10;
  72.       maxdim[4]:=10;
  73.       fivei:=5;
  74.       NEWAN(D,maxdim[0],fivei,four);
  75.       rval1:=30000.0;
  76.       actelem[0]:=40;
  77.       actelem[1]:=10;
  78.       actelem[2]:=10;
  79.       actelem[3]:=10;
  80.       actelem[4]:=10;
  81.       SETELN(D,actelem[0], rval1);
  82.       GETELN(D,actelem[0], rval2);
  83.       writeln (rval1:8,'     ',rval2:8);
  84.       writeln('end 5-D 4 by real');
  85.       writeln;
  86.       FREEA(D);
  87.       readln;
  88. }
  89.       end.
  90.